$(function(){var scrollOffset;$(window).load(function(){setScrollOffset();});$(window).resize(function(){setScrollOffset();});function setScrollOffset(){if($('.main-menu').is(':visible')){scrollOffset=($('.container-breakout').height())-40;} else {scrollOffset=60;}} $('a[href*=#]:not([href=#])').click(function(){var pageUrL=$(location).attr("href");if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){if(pageUrL.indexOf("bundles")>=1){$('html,body').animate({scrollTop:$('[name="bundletop"]').offset().top-250},1000);} else{var target=$(this.hash);target=target.length?target:$('[id='+this.hash.slice(1)+']');if(target.length){$('html,body').animate({scrollTop:target.offset().top-scrollOffset},1000);return false;}}}});if($(location.href.split("#")[1])){var target=$('#'+location.href.split("#")[1]);if(target.length){$('html,body').animate({scrollTop:target.offset().top-scrollOffset},1000);return false;}} $(document).ready(function(){var vidDefer=document.getElementsByTagName('iframe');for(var i=0;i0){$('.modal-header').css('display','none');$('[data-container="alerts"]').delay(durationMilliseconds).fadeOut('slow');$('body').removeClass('modal-open');} else{$('[data-dismiss="modal"]').css('display','inline');}} else{$('[data-container="alerts"]').fadeIn('slow');if(durationMilliseconds>0){$('[data-container="alerts"]').delay(durationMilliseconds).fadeOut('slow');} else{$('[data-dismiss="alert"]').css('display','inline');}}}